package com.dao;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.model.Question;
import com.model.Tag;
import com.util.Page;

public interface QuestionDAO {

	public Question findById(int id);

	public List<HashMap> findByIds(String ids);

	public void add(Question question);

	public void update(Question question);

	public boolean delete(int id);

	public void ignore(int id);

	public void unIgnore(int id);

	public void agree(int id);

	public void disagree(int id);

	public void favor(int id);
	
	public void collect(int id);

	public void addQuestionTag(int tagId, int questionId);

	public boolean isTagExist(int tagId, int questionId);

	public Page findByPage(int questionId, int page, int pageSize, String condition, boolean isPublic);

	public Page findAnsweredByPage(int questionId, int page, int pageSize);
	
	public Page findAnsweredByPagePublic(int questionId, int page, int pageSize);

	public Page findUnAnsweredByPage(int questionId, int page, int pageSize);

	public Page findIgnoreByPage(int questionId, int page, int pageSize);
	
	
	public Page findSendQuestionByPage_All(int userId, int page, int pageSize);
	
	public Page findSendQuestionByPage_AnswerdAll(int userId, int page, int pageSize);
	
	public Page findSendQuestionByPage_AnswerdPublic(int userId, int page, int pageSize);

	public Page findSendQuestionByPage_UnAsnwerd(int userId, int page, int pageSize);

	public Page findSendQuestionByPage_Ignored(int userId, int page, int pageSize);

	public void addCommentNum(int qid);

	public List<Tag> findTagsByQuestionId(int questionId);

	public Map findQuestionByIdWithUser(int questionId);

	public List findNewQuestionTopN(int topN);

	public List findHotQuestionTopN(int topN);

}
